package com.scau.wrongtitle.bean;

import com.scau.wrongtitle.domin.WrongTitle;
import lombok.Data;

import java.util.List;

@Data
public class WrongTitleBean {
    private String questionId;
    private String questionContent;
    private List<String> questionOption;
    private List<String> questionAnswer;
    private List<String> questionTags;

    private String grade;
    private String subject;
    private String type;
    private List<String> original;
    private boolean isFavorite;
    private boolean isOvercome;

    public WrongTitleBean(long questionId,
                          String questionContent,
                          List<String> questionOption,
                          List<String> questionAnswer,
                          List<String> questionTags,
                          String grade,
                          String subject,
                          String type,
                          List<String> original,
                          boolean isFavorite,
                          boolean isOvercome) {
        this.questionId = String.valueOf(questionId);
        this.questionContent = questionContent;
        this.questionOption = questionOption;
        this.questionAnswer = questionAnswer;
        this.questionTags = questionTags;
        this.grade = grade;
        this.subject = subject;
        this.type = type;
        this.original = original;
        this.isFavorite = isFavorite;
        this.isOvercome = isOvercome;
    }

    public WrongTitleBean(WrongTitle title,
                          List<String> questionOption,
                          List<String> questionAnswer,
                          List<String> questionTags,
                          List<String> original,
                          boolean isFavorite,
                          boolean isOvercome){
        this(title.getQuestionId(),
                title.getQuestionContent(),
                questionOption,
                questionAnswer,
                questionTags,
                title.getQuestionGrade(),
                title.getQuestionSubject(),
                title.getQuestionType(),
                original,
                isFavorite,
                isOvercome
                );
    }

}
